<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <title>Document</title>
    <style>
        img {
            position: relative;
        }
    </style>
</head>

<body>
    <img src="images/butiful.jpg" alt="">
</body>
<script>
    var pic = document.querySelector('img')
    document.addEventListener('mousemove',function(e){
        pic.style.left = e.pageX-50+'px';
        pic.style.top = e.pageY-50+'px';
    })
</script>
</html>